<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p2_盒子模型内间距测试</title>
    <style>
        .d1{
            width: 200px;
            height: 200px;
            background-color: lightcoral;
            font-size: 30px;
            color: white;
            border:3px  solid black;
            padding: 10px;
            padding: 10px 20px;
            padding: 10px 20px 30px;
            padding: 10px 70px 30px 40px;

            box-sizing: border-box;
            margin: 50px;
        }
        span {
            border: 2px solid #f00;
        }
        .s2 {
            margin: 30px;
        }
    </style>
</head>
<body>
    <span>span</span><span class="s2">span</span><span>span</span>
    <div class="d1">aaa</div>
</body>
</html>